/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintWriter;

/**
 * <p>Project: javase202202 - Out3
 * <p>Powered by Lisi On 2022-05-31 14:44:49
 * <p>Created by IntelliJ IDEA
 *

 * @version 1.0
 * @since 17
 */
public class Out3 {
    public static void main(String[] args) throws FileNotFoundException {
        //建立新文件，覆盖旧的文件
        //var out = new PrintWriter("d:/user.txt");

        //true使用的追加方式
        var out = new PrintWriter(new FileOutputStream("d:/user.txt",true));
        out.printf("姓名：%s,年龄：%d岁。%n", "李四", 28);
        out.close();
    }
}
